<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户列表</title>
<script type="text/javascript" src="${ctx}/resource/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="${ctx}/resource/js/common.js"></script>
</head>
<body>
	当前用户:${USER.name}
	<br> 在线人数:${OnLine}
	<br> 当前SessionID:${JSID}
	<br>

	<input type="button" value="事务测试" onclick="ajaxTransaction()" />

	<table>
		<tr>
			<th>ID</th>
			<th>姓名</th>
			<th>操作</th>
		</tr>
		<c:forEach items="${List}" var="item" varStatus="status">
			<tr>
				<th>${item.id}</th>
				<th>${item.name}</th>
				<th><a herf="${ctx}/test/edit/${item.id}.html">修改</a> <a herf="${ctx}/test/del/${item.id}.html">删除</a></th>
			</tr>
		</c:forEach>
	</table>
</body>
<script type="text/javascript">
	function ajaxTransaction() {
		sendRequest("${ctx}/test/ajaxTransaction.html", {
		}, function(data) {
			var obj = jQuery.parseJSON(data);
			$(".retMsg").text(obj.retMsg);
		});
	}
</script>
</html>